package cn.edu.scau.cmi.chensixiao.simpleFactoryMethod;

public class InsuranceFactory {
	public static Insurance getInstance(String insurTypeString) {
		Insurance insurance = null;
		switch(insurTypeString) {
		case"车上人员责任险": insurance = new DriverInsurance();break;
		case"车辆损失险": insurance = new CarInsurance();break;
		case"其他事故": insurance = new OtherInsurance();break;
		}
		return insurance;
	}
}
